package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.Order;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
* @author apep
* @description 针对表【order】的数据库操作Mapper
* @createDate 2024-08-15 14:09:09
* @Entity com.ruoyi.system.domain.Order
*/
public interface OrderMapper {


    int insertOrderBitchs(@Param("orderList")List<Order> orderList);

    List<Order> selectOrderBySendId(@Param("sendOrderId")String sendOrderId);

    int reciveOrder(@Param("actReciveCount")String actReciveCount,@Param("sendOrderId")String sendOrderId,@Param("gsConcentricityId")String gsConcentricityId);

    int reciveCancelOrder(@Param("actReciveCount")String actReciveCount,@Param("sendOrderId")String sendOrderId,@Param("gsConcentricityId")String gsConcentricityId);

    List<Order> listOrder(Order order);

    List<Order> newListOrder(Order order);

    @Select("select send_order_id from `order` where send_order_id like concat (#{preSendOrderId},'%') order by send_order_id desc limit 0,1 ")
    String getSendOrderId(@Param("preSendOrderId")String preSendOrderId);

    int updateOrderSendCount(@Param("actSendCount")String actSendCount,@Param("gsOrderTempid")String gsOrderTempid,@Param("sendOrderId")String sendOrderId,@Param("gsConcentricityId")String gsConcentricityId);

    int cancelOrder(@Param("gsOrderTempid")String gsOrderTempid,@Param("gsConcentricityId")String gsConcentricityId);

    int printNewSendOrder(@Param("id")String id,@Param("sendOrderId")String sendOrderId,@Param("actSendCount")String actSendCount,@Param("createTime")String createTime);

    List<Order> searchSendOrder(String sendOrderId);
    @Select("select id,gs_order_tempid,send_order_id from `order` where send_order_id is not null")
    List<Order> searchOrderStatus();
}




